package com.szc.demo01.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.szc.demo01.pojo.dto.UserDto;
import lombok.*;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * 员工登录信息表
 * @author Administrator
 */
@TableName("user")
@Data
@NoArgsConstructor
public class User {
    @TableId(value = "id",type = IdType.AUTO)
    private long id;
    private String username;
    private String password;
    private String email;
    private String tel;
    private String address;

    public User(UserDto userDto){
        this.id = userDto.getId();
        this.username = userDto.getUsername();
        this.password = userDto.getPassword();
        this.email = userDto.getEmail();
        this.tel = userDto.getTel();
        this.address = userDto.getAddress();
    }
}
